<template>
	<view class="page">
		<view class="pageBg">
			<image src="https://bjsx.gzwhir.com/admin-api/infra/file/18/get/memberbg2.png" mode="aspectFill"></image>
		</view>
		<view class="flex0">
			<u-navbar :fixed='false' bgColor="transparent" @leftClick="navBack" title="信息通知">
				<view slot="center" class="navTitle">
					信息通知
				</view>
			</u-navbar>
		</view>
		<view class="flex1">
			<scroll-view scroll-y="true" class="scrollView pt30">
				<view class="pd30">
					<u--textarea :maxlength="100000" autoHeight v-model="info.content"
						placeholder="请输入内容"></u--textarea>
				</view>
			</scroll-view>
		</view>
		<view class="flex0 pd30 ftools">
			<view class="btn on" @tap="save">
				<view class="p">
					保存
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					content: ''
				},
			}
		},
		watch: {},
		methods: {

			save() {

				this.$db.set('zhenNotice', this.info)
				uni.navigateBack()
			}
		},
		onShow() {
			if (this.$db.get('zhenNotice')) {
				this.info = this.$db.get('zhenNotice')
			}

		}
	}
</script>

<style lang="scss" scoped>
	.noticeTemplate {
		padding: 50rpx 30rpx;
		background: #fff;
		border-radius: 30rpx;

		.tit {
			text-align: center;
			font-size: 36rpx;
			margin-bottom: 30rpx;
			color: #65554d;
		}

		.content {
			color: #65554d;
			font-size: 28rpx;
			line-height: 1.7;
		}
	}

	.ftools {
		padding-top: 40rpx;
		padding-bottom: 60rpx;
		background: #fff;
		border-radius: 30rpx 30rpx 0 0;
		display: flex;
		align-items: center;

		.btn {
			flex: 0 0 auto;
			font-size: 28rpx;
			padding: 0 30rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			color: #fe9c29;
			background: #ffefdd;
			height: 90rpx;
			border-radius: 90rpx;
			margin-right: 20rpx;

			.ico {
				flex: 0 0 auto;
				margin-right: 20rpx;

				image {
					display: block;
					width: 34rpx;
					height: 34rpx;
				}
			}

			&.on {
				background: #fe9c29;
				color: #fff;
				flex: 1 1 auto;
			}

			&:last-child {
				margin-right: 0;
			}
		}
	}
</style>